package com.eningqu.aipen.logic;

import com.eningqu.aipen.logic.model.login.LoginUserBean;
import com.eningqu.aipen.utils.SPUtil;

/**
 * Package:com.eningqu.aipen.logic
 * Author:starr
 * Time:2023/9/14  13:27
 * Description: 无用
 */
public class Repository {

    private static volatile Repository mInstance;

    private Repository(){ }

    public static Repository getInstance(){
        if(mInstance==null){
            synchronized (Repository.class){
                if(mInstance==null){
                    mInstance=new Repository();
                }
            }
        }
        return mInstance;
    }

    public LoginUserBean getUserInfo(){
        //读取本地数据库
        String userPhone = (String) SPUtil.getInstance().getData("userPhone","");
        String userPassword = (String) SPUtil.getInstance().getData("userPassword","");
        if(userPhone==null||userPassword==null){
            //本地没有就需要用户登录

        }
        return new LoginUserBean(userPhone,userPassword);
    }
}
